<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTopicTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('topic', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('num')->default(0)->comment('题目编号');
            $table->text('topic')->nullable()->comment('题目内容');
            $table->integer('type')->default(1)->comment('类型:1:单选，2:多选');
            $table->integer('status')->default(0)->comment('题目状态0:未启用,1:启用');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
